Spot Light Data Structure
You use a
spot light data structure
to get or set information about a spot light source. A spot light data structure is defined by the
TQ3SpotLightData
data type.
typedef struct TQ3SpotLightData {
TQ3LightData lightData;
TQ3Boolean castsShadows;
TQ3AttenuationType attenuation;
TQ3Point3D location;
TQ3Vector3D direction;
float hotAngle;
float outerAngle;
TQ3FallOffType fallOff;
} TQ3SpotLightData;
-
lightData
-
A light data structure specifying basic information about the spot light.
-
castsShadows
-
A Boolean value that indicates whether the spot light casts shadows (
kQ3True
) or not (
kQ3False
).
-
attenuation
-
The type of attenuation of the spot light. See
"Light Attenuation Values"
for a description of the constants that can be used in this field.
-
location
-
The location of the spot light, in world coordinates.
-
direction
-
The direction of the spot light. Note that the direction is defined as a world-space vector
away from
the light source. This vector does not need to be normalized, but vectors returned by QuickDraw 3D in this field might be normalized.
-
hotAngle
-
The hot angle of the spot light. The hot angle of a spot light is the half-angle, measured in radians, from the center of the cone of light within which the light remains at constant full intensity. The value in this field is a floating-point number in the range 0.0 to /2, inclusive.
-
outerAngle
-
The outer angle of the spot light. The outer angle of a spot light is the half angle, measured in radians, from the center of the cone of light to the edge of the light's influence. The value in this field is a floating-point number in the range 0.0 to /2, inclusive, and should always be greater than or equal to the value in the
hotAngle
field.
-
fallOff
-
The fall-off value for the spot light. See
"Light Fall-Off Values"
for a description of the constants that can be used in this field.
© 1997 Apple Computer, Inc.
Previous | QD3D Book | Overview | Chapter Contents | Next |